<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
        .div {
            margin-top: 40px;
            width: 200px;
            height: 100px;
            border: 5px solid black;
        }
        .happy {
            border: 5px solid pink;
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <div id="root">
        <div class="div" :style="style">黑马</div>
    </div>
    <script>
        Vue.config.productionTip = false;

        let vm = new Vue({
            el: '#root',
            data: {
                style:{
                    border: "5px solid pink",
                    // 写成驼峰命名法
                    backgroundColor: "skyblue",
                }
            },
        });
    </script>
</body>
</html>